Marketing automation using Mautic

Giteqa

Hello friends!

Today we will talk about a tool that helps millions of people automate marketing and significantly simplifies the work of marketers. This tool is called Mautic, and today you will learn what it is, what advantages it has, who needs it, and, of course, how to install it.


What is Mautic?

Mautic is a free, open-source marketing automation platform that helps companies manage and automate their marketing campaigns, customer journeys, and communications.
It is widely used for email marketing, lead generation, campaign tracking, and customer segmentation.


What are the advantages of Mautic?

Mautic has many advantages, but here we will highlight the most commonly mentioned by users:

  • Marketing automation – creating email sequences, contact segmentation, and triggered scenarios.

  • Personalization – targeting based on user behavior and interests.

  • Multichannel – email, SMS, push notifications, social media.

  • Open source – flexible customization and no licensing restrictions.

  • Analytics and reports – campaign tracking, ROI, user behavior analysis.

  • Integrations – CRM, CMS, websites, and other services via API.

  • Cost-effective – does not require expensive subscriptions if self-hosted.


Who needs Mautic?

This tool is used by many, from hired marketers to large companies.
It is a universal solution for anyone who wants to automate email, set up targeting, and generally dive deeper into marketing.
Whether you are a freelance marketer or work in a company, Mautic will help you improve your workflow.


How to install Mautic on Linux


System update and preparation

sudo apt update sudo apt upgrade -y sudo apt install -y apt-transport-https ca-certificates curl software-properties-common
  • sudo apt update — updates the list of packages and repositories.

  • sudo apt upgrade -y — updates all installed packages to the latest versions automatically.

  • Installs necessary packages for working with external repositories:

    • apt-transport-https — support for downloading packages via HTTPS

    • ca-certificates — security certificates for HTTPS

    • curl — utility to download data from URLs

    • software-properties-common — allows adding external repositories and managing PPAs


Adding Docker GPG key and repository

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker.gpg

Downloads Docker’s GPG key and saves it for package verification.

echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list /dev/null

Adds the official Docker repository for installing the latest Docker CE versions.


Installing Docker and Docker Compose

sudo apt update sudo apt install -y docker-ce docker-compose sudo systemctl enable docker sudo systemctl start docker
  • docker-ce — Docker Community Edition

  • docker-compose — tool for running multi-container applications

  • systemctl enable docker — enables Docker to start at boot

  • systemctl start docker — starts the Docker service


Setting up the Mautic project with Docker

mkdir ~/mautic-docker cd ~/mautic-docker nano docker-compose.yml
  • Creates a folder for the Mautic Docker project

  • Opens docker-compose.yml for editing

version: '3.3' services: mautic: image: mautic/mautic:latest container_name: mautic restart: always ports: - "8081:80" environment: - MAUTIC_DB_HOST=db - MAUTIC_DB_USER=mautic - MAUTIC_DB_PASSWORD=mauticpass - MAUTIC_DB_NAME=mauticdb volumes: - mautic_data:/var/www/html db: image: mysql:5.7 container_name: mautic-db restart: always environment: - MYSQL_ROOT_PASSWORD=rootpass - MYSQL_DATABASE=mauticdb - MYSQL_USER=mautic - MYSQL_PASSWORD=mauticpass volumes: - db_data:/var/lib/mysql volumes: mautic_data: db_data:
  • Creates two containers:

    • Mautic — marketing automation platform

    • MySQL — database for Mautic

  • Volumes — store container data on the host system

docker-compose up -d

Starts containers in detached mode.


Installing Apache and setting up a reverse proxy

sudo apt install apache2 -y sudo a2enmod proxy proxy_http rewrite headers sudo nano /etc/apache2/sites-available/mautic-docker.conf
  • Installs Apache web server

  • Enables modules:

    • proxy and proxy_http — for proxying requests

    • rewrite — URL redirection

    • headers — HTTP headers support

Virtual host configuration:

<VirtualHost *:8080> ServerName yourdomain.com ServerAdmin [email protected] ProxyPreserveHost On ProxyPass / http://localhost:8081/ ProxyPassReverse / http://localhost:8081/ ErrorLog ${APACHE_LOG_DIR}/mautic_proxy_error.log CustomLog ${APACHE_LOG_DIR}/mautic_proxy_access.log combined </VirtualHost>
  • Proxies all requests from port 8080 to the Docker container running Mautic on port 8081.

sudo a2ensite mautic-docker.conf sudo nano /etc/apache2/ports.conf sudo systemctl reload apache2 sudo systemctl restart apache2
  • Enables the site and reloads/restarts Apache to apply changes.


Video guide for installing Mautic

For those who prefer to see the full installation process visually, a video tutorial is available:




Conclusion

Mautic is not just a tool—it’s a comprehensive marketing solution for automating routine tasks, speeding up team workflows, and managing all marketing processes efficiently.
It is useful for anyone involved in advertising who wants to reach a higher level.
In this article, we covered what Mautic is and how to install it.

Thank you for reading, and good luck with your marketing campaigns!

Author – Anatolie Cohaniuc